package lanxing.future.base.chapter10;

/**
 * @author <a href="mailto:lanxing@chances.com.cn">lanxing</a>
 * @version 2019年8月1日
 *
 */
public class NiMing {
    
    
    public Father getFather(int id, String name) {
        return new Father(id,name) {
            public void print() {
                System.out.println(id+","+name);
            }
        };
    }
    
    public static void main(String[] args) {
        NiMing nm = new NiMing();
        Father father = nm.getFather(1, "father");
        //father.print();
    }
}

class Father {
    private int id;

    private String name;

    /**
     * @param id2
     * @param name2
     */
    public Father(int id2, String name2) {
        // TODO Auto-generated constructor stub
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

}
